Fix overlapping edits in postfix completions - #3861
Open
tartarughina wants to merge 1 commit into
Open
Conversation
Replace the complete postfix expression with one primary text edit. Keep independent context edits, such as imports, in additionalTextEdits so completion edits conform to the LSP contract. Update postfix tests for resolution, item defaults, and edit overlap. Signed-off-by: Riccardo Strina <riccardo.strina@icloud.com>
tartarughina
force-pushed
the
tartarughina/postfix-completion-overlap
branch
from
August 6, 2026 21:32
2c5a8c4 to
079a845
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Postfix completions now replace the complete expression with one primary
textEdit. Independent context edits, such as imports, remain inadditionalTextEdits.This conforms to the LSP specification, which prohibits overlapping completion edits.
Tests cover resolution, item defaults, and edit overlap.
Addresses zed-extensions/java#295, which includes the original investigation and reproduction.